﻿using DataModels.Enums.ParkingLot;
using SqlSugar;

namespace DataModels.Entities.ParkingLot
{
    [SugarTable]
    public class ParkingSpaceUserRelation
    {
        [SugarColumn(IsPrimaryKey = true)]
        public Guid UUID { get; set; } = Guid.NewGuid();
        
        /// <summary>
        /// 车位ID
        /// </summary>
        public Guid ParkingSpaceUUID { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        public Guid UserUUID { get; set; }

        /// <summary>
        /// 关系类型
        /// </summary>
        public ParkingSpaceUserRelationType Type { get; set; }

        /// <summary>
        /// 关系状态
        /// </summary>
        public ParkingSpaceUserRelationStatus Status { get; set; } = ParkingSpaceUserRelationStatus.Active;

        /// <summary>
        /// 开始日期
        /// </summary>
        public DateTime StartDate { get; set; }

        /// <summary>
        /// 结束日期（可为空，表示永久关系）
        /// </summary>
        public DateTime? EndDate { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; } = DateTime.Now;
    }
}
